package com.example.springbootdemo.aop;

import com.example.springbootdemo.lifecycle.MyBeanPostProcessor;
import com.fasterxml.jackson.annotation.JacksonAnnotation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.EnableAspectJAutoProxy;

@Configuration
//  @ComponentScan("com.example.springbootdemo.aop")
@EnableAspectJAutoProxy
public class MyAopMainConfig {

    @Bean
    public MyAspect myAspect() {
        return new MyAspect();
    }
    @Bean
    public MyMathServes myMathServes(){
        return new MyMathServes();
    }

    /*@Bean
    public MyBeanPostProcessor myBeanPostProcessor(){
        System.out.println("执行 @Bean 中方法");
        return new MyBeanPostProcessor();
    }*/

}

